import { createApp } from 'vue'
import App from './App.vue'
import './index.css'
import router from "./router/index";

createApp(App).use(router).mount('#app')


const  whileList=['/']
router.beforeEach((to,from,next)=>{
    if (whileList.includes(to.path)||localStorage.getItem("token")){
        next()
    }else {
        next('/')
    }
})
